Copyright (C) Intel Corporation, 2003 - 2021 All Rights Reserved.

Intel(R) Active Management Technology (Intel(R) AMT):
A short description of the AMTRedirection sample for the usage of developers.

AMTRedirection sample application:
----------------------------------
This sample demonstrates how to use the Intel(R) AMT Redirection commands along 
with remote boot options. 

AMTRedirection sample uses these dlls/libs, as infrastructure:
	From the RedirectionLib module:
		IMRSDK.dll
		IMRSDK_x64.dll
	From the WS-ManagementCpp module:
		CPPCimFramework.dll
		CPPCimFramework_x64.dll 
		CPPCimFrameworkUntyped.dll
		CPPCimFrameworkUntyped_x64.dll 
		CimOpenWsmanClient.lib 
		CimOpenWsmanClient_x64.lib 

How to run the sample:
----------------------
1. For SOL session you'll need to download Putty.exe terminal. You can download 
   here: https://putty.org/. Put it in the sample directory. 
1. Run AMTRedirection.exe from CMD. For menu option type 'l'.

How to compile the sample:
--------------------------
1. Open "AMTredirection.vcproj" in Microsoft Visual Studio* and build the 
   project. An output file "AMTRedirection.exe" should be created.
2. Make sure that the Intel(R) AMT device has been activated on the target
   machine.
3. Use the generated executable as described in the command usage (type the 
   command to get the usage instructions). 

Notes:
------
1. Notice that if the IDER session disconnects for an unexpected reason, the 
   sample will not notify the user until user enters a request related to IDER. 
   Only then will the sample display a related message.
2. An INI file is used for the redirection parameters and must be in the same 
   directory as the executable file. An example INI file is given with this 
   application. It is highly recommended that the value of the parameter 
   Storage_Enabled be set to 0. By default, the sample will use the INI file 
   "MC_RedTool.ini".
3. In order to connect to the Intel(R) AMT in TLS mode, -tls option should be 
   chosen and the required certificates should be loaded in one of the following
   ways:
   a. Load certificates from files:
		-CACert <the file path of the root certificate for validation of the
		Intel(R) AMT device>
		-privateCert <the file path of the private certificate for mutual 
		authentication>.
		-privateCertPass <Password for the private certificate.>
		For example: 
		(*) "-host AMT.intel.com -user admin -pass Admin!123 -tls -CACert 
		"c:\CACert.cer""
		(**)"-host AMT.intel.com -user admin -pass Admin!123 -tls -CACert 
		"c:\CACert.cer" -privateCert "c:\privCert.pem" -privateCertPass "q""
   b. Load certificates from Microsoft(R) Certificates Store:
        (*) In order to connect in TLS-Server mode (not mutual authentication) 
		to the Intel(R) AMT, the CA certificates should be installed in the Root 
		CA store and then the following example command should be invoked: 
		"-host AMT.intel.com -user admin -pass Admin!123 -tls"
		(**)In order to connect in TLS-Mutual Athentication to the Intel(R) AMT, 
		the CA certificates should be installed in the Root CA store, the 
		private certificate should be installed in the Personal store and then 
		the following example command should be invoked: 
		"-host AMT.intel.com -user admin -pass Admin!123 -tls -MA -commonName 
		<the subject:CN of the private certificate>"
4. This sample launches putty* Terminal Emulator when opening an SOL session. 
   Either make sure that the putty.exe file is located in the same directory as 
   the application or set the PATH environment variable to point to its location
   As said above, you'll need to download putty.exe. Can be downloaded from 
   here: https://putty.org/.
   After the application launches putty, configure its settings as follows:
   - Right-click on the putty window title bar, and select "Change Settings...".
   - Select "Terminal" and change both "Local Echo" and "Local Line Editing" to
     "Force Off".
   - Select "Terminal-Keyboard", change the sequence sent by the Function keys
     and keypad to be "VT100+" and the sequence sent by the Backspace key to be
     "Control-H".
   - Optionally, select "Session" and Save to save these settings for future
     sessions.
   - Click Apply for the settings to take effect.
   To use the Windows Telnet client instead of PuTTY, set the
   variable "TERM_CMD" at the top of the MCSOL.cpp file to be "TELNET_CMD", 
   instead of "PUTTY_CMD". In this case, make sure that the Windows Telnet 
   client is installed on your system.
   Note that this sample *does not* implement a Telnet server. As a result, the
   behavior of the Telnet client, which expects to operate opposite a server, 
   may not be what is expected (for example, display issues relating to local 
   echo).
5. Redirection operations require User Consent when the target system is 
   configured in client control mode. This operation might fail if consent was 
   not obtained. Please see the User Consent sample in order to obtain consent.

-------------------------------------------------------------------
* Other names and brands may be claimed as the property of others.
